/**
 * Copyright (C) 2012-2013 Dystopian Dreams
 * @author Danielle Obmann <alisiel.isalos@gmail.com>
 * 
 * 
 * This file is part of Grue.

    Grue is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Grue is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Grue.  If not, see <http://www.gnu.org/licenses/>.
 */
import java.util.ArrayList; 
import javax.swing.DefaultListModel;

public class Party 
{
    DefaultListModel thePartyList;
    ArrayList<Character> theParty;
    
    public Party()
    {
        thePartyList=new DefaultListModel();
        theParty=new ArrayList();
    }
    
    void addMember (String argName)
    {
        Character theCharacter=new Character(argName);
        theParty.add(theCharacter);
        thePartyList.addElement(theCharacter.getName());
    }
    
    void removeMember (int index)
    {
        theParty.remove(index);
        thePartyList.remove(index);
    }
    
    void clearParty ()
    {
        theParty.clear();
        thePartyList.clear();
    }
    
    DefaultListModel getList()
    {
        return thePartyList;
    }
    
    ArrayList<Character> getParty()
    {
        return theParty;
    }
}
